package com.china08.yxyapi.api.manage.sch.platform.weikecheng;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.china08.yxyapi.api.YxyApiBaseController;
import com.china08.yxyapi.model.YxyApiPageReqModel;
import com.china08.yxyapi.model.YxyApiRespModel;
import com.china08.yxyapi.service.yxweike.YxyWeikeService;

/**
 * 学校管理员平台管理----微课---待审核数量
 * 
 */
@CrossOrigin
@RestController
public class WeikechengSrhCountController extends YxyApiBaseController {

    @Autowired
    private YxyWeikeService weikeService;

    @RequestMapping(value = "/api_yw/manage/sch/platform/weikecheng/auditcount", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Object process(HttpServletRequest request, HttpServletResponse response, RespModel respModel) {
        String eduId = getProfile(request, response).getSchoolId();
        long count = weikeService.auditCountSch(eduId);
        respModel = new RespModel();
        respModel.auditCount = count;
        return respModel;
    }

    protected static class ReqModel extends YxyApiPageReqModel {

    }

    protected static class RespModel extends YxyApiRespModel {
        public long auditCount;// 待审核数量

    }

}
